import request from '@/utils/request.js'

//查询应急信息列表

export const getEmergencies = () => {
    return request.get('/emergencies');
}

export const getEmergencyById = (id) => {
    return request.get('/emergencies/'+id);
}

export const getEmergenciesApproved = () => {
    return request.get('/emergencies/approved');
}

export const addEmergency = (data) => {
    return request.post('/emergencies', data);
}

export const approveEmergency = (id) => {
    return request.patch(`/emergencies/${id}`);
}
